package com.victualler.core.base.repository;

import com.victualler.core.base.dao.*;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.repository.NoRepositoryBean;

import javax.transaction.Transactional;
import java.io.Serializable;
import java.util.List;

/**
 * @Author: Guoshichang
 * @Date: Create in 11:23 2018-05-06
 * @Discription:
 */
@NoRepositoryBean
public interface BaseDetailRepository<E extends BaseDetailDao,ID extends Serializable>  extends BaseRepository<E,ID> {

    public List<E> findByParentId(Long parentId);
    @Modifying
    @Transactional
    public void deleteByParentId(Long parentId);
}
